<template>
  <div class="container">
    <category-com title="游戏">
      <template scope="{ games }">
        <ul>
          <li v-for="(item, index) in games" :key="index">
            {{ item }}
          </li>
        </ul>
      </template>
    </category-com>

    <category-com title="游戏">
      <template slot-scope="{ games }">
        <h4 v-for="(item, index) in games" :key="index">
          {{ item }}
        </h4>
      </template>
    </category-com>

    <category-com title="游戏">
      <template v-slot:default="{ games }">
        <ol>
          <li v-for="(item, index) in games" :key="index">
            {{ item }}
          </li>
        </ol>
      </template>
    </category-com>
    <hr />
  </div>
</template>

<script>
import Category from "./component/Category";
export default {
  name: "App",
  components: {
    "category-com": Category,
  },
};
</script>

<style>
.container {
  display: flex;
  justify-content: space-around;
}
</style>
